package org.jetlinks.pro.things;

import lombok.Getter;
import lombok.Setter;
import org.hswebframework.web.validator.ValidatorUtils;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Map;

@Getter
@Setter
public class ProviderProperties {
    @NotBlank
    private String provider;
    @NotNull
    private Map<String, Object> configuration;

    public void validate() {
        ValidatorUtils.tryValidate(this);
    }
}